package uk.co.biggroup.lotto.syndicate;

import android.util.Log;

public class Logh {
	private static final String STAGE = "dev";
	private static final boolean LOGGING = false;
	private static final String TAG = "BIG-SYN";

	private static final int LOGLEVEL = 6;

	private static final boolean ERROR = LOGLEVEL > 0; // always kept
	private static final boolean WARN = LOGLEVEL > 1; // always kept
	private static final boolean INFO = LOGLEVEL > 2; // always kept
	private static final boolean DEBUG = LOGLEVEL > 3; // Debug logs are
														// compiled in but
														// stripped at runtime
	private static final boolean VERBOSE = LOGLEVEL > 4;
//	private static final boolean ASSERT = LOGLEVEL > 5;

	public static void i(String... args) {
		if (INFO) {
		if (LOGGING) {
			for (String arg : args) {
				Log.i(TAG, arg);
			}
		}
		}
	}

	public static void d(String... args) {
		if (DEBUG) {
		if (LOGGING) {
			for (String arg : args) {
				Log.d(TAG, arg);
			}
		}
		}
	}

	public static void e(String... args) {
		if (ERROR) {
		if (LOGGING) {
			for (String arg : args) {
				Log.e(TAG, arg);
			}
		}
		}
	}

	public static void v(String... args) {
		if (STAGE == "dev") {
			if (VERBOSE) {
			if (LOGGING) {
				for (String arg : args) {
					Log.v(TAG, arg);
				}
			}
			}
		}
	}

	public static void w(String... args) {
		if (WARN) {
		if (LOGGING) {
			for (String arg : args) {
				Log.w(TAG, arg);
			}
		}
		}
	}

	public static void wtf(String... args) {
		if (LOGGING) {
			for (String arg : args) {
				Log.wtf(TAG, arg);
			}
		}
	}

}
